/**
 * @author: MaLiang
 * @date: 2020/8/7 10:31
 * @version: 1.0
 **/
import com.gtmc.mould.jsonstr.JsonArrResolving;
import com.gtmc.mould.kafka.PaasKafkaConsumer;
import com.gtmc.mould.shell.ShellHelp;

import java.util.logging.Logger;

public class Login {
    Logger logger = Logger.getLogger(Login.class.getName());

    public static void main(String args[]) throws Exception {
        Logger logger = Logger.getLogger(Login.class.getName());
        logger.info("==========开始程序==========");
        //这里总调度
        //传入topic-name  cpisMouldCost
        String topic_name = "cpisMouldCost";
        logger.info("==========topic_name:"+topic_name+"==========");

        PaasKafkaConsumer kafkaC = new PaasKafkaConsumer(topic_name);
        Thread thread= new Thread(kafkaC);
        thread.start();
        //测试模块
/*        String json = "{\n" +
                "  \"data\": [{\n" +
                "      \"key\": \"00000000000516876000\",\n" +
                "      \"tierOnePartNo\": \"45100-0R270-Z1\",\n" +
                "      \"partNo\": \"45100-813BL-1\",\n" +
                "      \"partLength\": 1234,\n" +
                "      \"partWidth\": 123,\n" +
                "      \"partHeight\": 3444,\n" +
                "      \"partThickness\": 444,\n" +
                "      \"partMaterial\": \"铝合金\",\n" +
                "      \"modelTypeName\": \"注塑模具\",\n" +
                "      \"mouldMaterial\": \"合金\",\n" +
                "      \"mouldLength\": 12,\n" +
                "      \"mouldWidth\": 13,\n" +
                "      \"mouldHeight\": 14,\n" +
                "      \"mouldWeight\": 15,\n" +
                "      \"equipmentTonnage\": \"1\",\n" +
                "      \"takeNum\": \"222\",\n" +
                "      \"equipmentTypeName\": null,\n" +
                "      \"processName\": \"CP-CP-DR-RST\",\n" +
                "      \"camNum\": \"22\",\n" +
                "      \"mouldStepNum\": \"23\",\n" +
                "      \"emptyCoefficient\": 0.2,\n" +
                "      \"lifeNum\": \"33\",\n" +
                "      \"manufacturer\": \"测试供应商2\",\n" +
                "      \"unitPrice\": 123,\n" +
                "      \"quoteTime\": \"2019-06-13 13:43:19\",\n" +
                "      \"supplier\": \"C2004101201\",\n" +
                "      \"dataStatus\": \"D\"\n" +
                "    }, {\n" +
                "      \"key\": \"000002736113dae1001a\",\n" +
                "      \"tierOnePartNo\": \"45100-0R270\",\n" +
                "      \"partNo\": \"45103-07050\",\n" +
                "      \"partLength\": 13,\n" +
                "      \"partWidth\": 12,\n" +
                "      \"partHeight\": 14,\n" +
                "      \"partThickness\": 11,\n" +
                "      \"partMaterial\": \"铝合金\",\n" +
                "      \"modelTypeName\": \"注塑模具\",\n" +
                "      \"mouldMaterial\": \"ASD\",\n" +
                "      \"mouldLength\": 33,\n" +
                "      \"mouldWidth\": 35,\n" +
                "      \"mouldHeight\": 34,\n" +
                "      \"mouldWeight\": 123,\n" +
                "      \"equipmentTonnage\": \"123\",\n" +
                "      \"takeNum\": \"36\",\n" +
                "      \"equipmentTypeName\": null,\n" +
                "      \"processName\": null,\n" +
                "      \"camNum\": \"0\",\n" +
                "      \"mouldStepNum\": \"0\",\n" +
                "      \"emptyCoefficient\": null,\n" +
                "      \"lifeNum\": \"37\",\n" +
                "      \"manufacturer\": \"测试供应商3\",\n" +
                "      \"unitPrice\": 45,\n" +
                "      \"quoteTime\": null,\n" +
                "      \"supplier\": \"C2004101201\",\n" +
                "      \"dataStatus\": \"I\"\n" +
                "    }]\n" +
                "  }";
        JsonArrResolving jsonArrResolving = new JsonArrResolving();
        jsonArrResolving.jsonToObject(json);*/



    }

}
